package com.gxar.quick.ar.server.base.model.exchange.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.gxar.quick.ar.server.base.common.utils.BigDecimalSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author linsy
 * @version 1.0
 * @created 2024/2/22 09:29
 */
@ApiModel("管理后台兑换品基础信息")
@Data
public class BaseAdminExchangeItemVO {

    @ApiModelProperty("序号")
    @JSONField(name = "id")
    @JsonProperty("id")
    private String id;

    @ApiModelProperty("兑换码")
    @JSONField(name = "code")
    @JsonProperty("code")
    private String code;

    @ApiModelProperty("兑换品名称")
    @JSONField(name = "name")
    @JsonProperty("name")
    private String name;

    @ApiModelProperty("创建人")
    @JSONField(name = "creator")
    @JsonProperty("creator")
    private String creator;

    @ApiModelProperty("创建日期")
    @JSONField(name = "createdAt")
    @JsonProperty("createdAt")
    @JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8")
    private Date createdAt;

    @ApiModelProperty("修改日期")
    @JSONField(name = "updated_at")
    @JsonProperty("updated_at")
    @JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8")
    private Date updatedAt;

    @ApiModelProperty("价格")
    @JSONField(name = "price")
    @JsonProperty("price")
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal price;

    @ApiModelProperty("兑换方式 1-手动，2-自动，3-扫码")
    @JSONField(name = "method")
    @JsonProperty("method")
    private Integer method;

    @ApiModelProperty("兑换品二维码")
    @JSONField(name = "qr_code")
    @JsonProperty("qr_code")
    private String qrCode;

    @ApiModelProperty("活动ID")
    @JSONField(name = "activity_id")
    @JsonProperty("activity_id")
    private String activityId;

    @ApiModelProperty("活动是否启用。核销完返回false，如果为null或者true表示未核销")
    @JSONField(name = "activity_enable")
    @JsonProperty("activity_enable")
    private Boolean activityEnable;

}
